package com.woniu.car.parameter;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.Pattern;
import java.util.Date;

/**
 * Description:
 * date: 2021/6/22 17:16
 *
 * @author zhoubinbin
 * @since
 */
@Data
@ApiModel("新增车辆信息参数对象")
public class AddCarParam {

    /**
     * 品牌
     */
    @ApiModelProperty(value = "品牌",example = "奥迪",required = true)
    private String brand;

    /**
     * 车系
     */
    @ApiModelProperty(value = "车系",example = "A4L",required = true)
    private String demio;

    /**
     * 排量
     */
    @ApiModelProperty(value = "排量",example = "1.4T",required = true)
    private String displacement;

    /**
     * 年份
     */
    @ApiModelProperty(value = "年份",example = "2018",required = true)
    private String vintage;

    /**
     * 款式
     */
    @ApiModelProperty(value = "款式",example = "手动",required = true)
    private String type;

    /**
     * 车牌号
     */
    @ApiModelProperty(value = "车牌号",example = "渝A88888",required = true)
    @Pattern(regexp = "^[京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼使领A-Z]{1}[A-Z]{1}(?:(?![A-Z]{4})[A-Z0-9]){4}[A-Z0-9挂学警港澳]{1}$")
    private String numberPlate;

    /**
     * 车架号
     */
    @ApiModelProperty(value = "车架号",example = "行驶证上的车辆识别码",required = true)
    private String ljnmdvVin;

    /**
     * 发动机号
     */
    @ApiModelProperty(value = "发动机号",example = "272924",required = true)
    private String engineNo;

    /**
     * 上牌时间
     */
    @ApiModelProperty(value = "上牌时间",example = "2019-01-05",required = true)
    @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
    private Date board;

    /**
     * 公里数
     */
    @ApiModelProperty(value = "行驶里程",example = "1000",required = true)
    private Integer mileage;
}
